<template>
	<view class="stagin">
		<view>
			<u-navbar>
				<view slot="left" class="text-white">{{ store.storeName }}</view>
			</u-navbar>
		</view>
		<view class="grid" v-for="(item, index) in baseList" :key="index">
			<text class="title">{{ item.title }}</text>
			<view class="hr"></view>
			<view class="menu">
				<view class="item" v-for="(jm, jx) in item.list" :key="jx" @click="goto(jm.route)">
					<image class="icon" mode="aspectFit" :src="jm.icon" />
					<text class="grid-text">{{ jm.title }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
import { uNavigateTo } from '../../utils/uniUtils';
export default {
	data() {
		return {
			baseList: [
				// {
				// 	title: "开店设置",
				// 	list: [
				// 		{ name: "photo", title: "门店档案" },
				// 		{ name: "lock", title: "收银基础设置" },
				// 		{ name: "star", title: "结算账户管理" },
				// 		{ name: "photo", title: "前台码" },
				// 		{ name: "lock", title: "结账方式管理" },
				// 		{ name: "star", title: "券类管理" },
				// 		{ name: "photo", title: "常用备注" },
				// 		{ name: "lock", title: "员工账号" },
				// 	],
				// },
				{
					title: '菜品管理',
					list: [
						{
							icon: '/static/images/staging/cp.png',
							title: '菜品资料',
							route: '/pages/workbench/food/list'
						},
						{
							icon: '/static/images/staging/fl.png',
							title: '菜品分类',
							route: '/pages/workbench/foodcategory/list'
						},
						{
							icon: '/static/images/staging/lc.png',
							title: '录菜',
							route: '/pages/workbench/food/transfer'
						},
						{
							icon: '/static/images/staging/zf.png',
							title: '做法',
							route: '/pages/workbench/task/list'
						},
						{
							icon: '/static/images/staging/zffl.png',
							title: '做法分类',
							route: '/pages/workbench/taskcategory/list'
						},
						{
							icon: '/static/images/staging/jl.png',
							title: '加料',
							route: '/pages/workbench/feed/list'
						},
						{
							icon: '/static/images/staging/jlfz.png',
							title: '加料分组',
							route: '/pages/workbench/feedcategory/list'
						},
						{
							icon: '/static/images/staging/remark.png',
							title: '常用备注',
							route: '/pages/workbench/remark/list'
						},
						{
							icon: '/static/images/staging/imageFoods.png',
							title: '识别录菜',
							route: '/pages/workbench/recognition/list'
						},
						{
							icon: '/static/images/staging/guqing.png',
							title: '估清',
							route: '/pages/workbench/guqing/list'
						}
					]
				},
				{
					title: '餐厅管理',
					list: [
						{
							icon: '/static/images/staging/ct.png',
							title: '桌台管理',
							route: '/pages/workbench/tableRms/list'
						},
						{
							icon: '/static/images/staging/ctqy.png',
							title: '桌台区域',
							route: '/pages/workbench/tableArea/list'
						},
						{
							icon: '/static/images/staging/scan.png',
							title: '桌台绑定',
							route: '/pages/workbench/scanDesk/index'
						},
						/*       {
              icon: "/static/images/staging/fwf.png",
              title: "服务费",
              route: "/pages/workbench/serviceFee/list",
            }, */
						{
							icon: '/static/images/staging/fpsz.png',
							title: '副屏设置',
							route: '/pages/workbench/screensetting/list'
						},
						{
							icon: '/static/images/staging/print.png',
							title: '云打印设置',
							route: '/pages/workbench/printSetting/list'
						},
						{
							icon: '/static/images/staging/paperSetting.png',
							title: '小票模板',
							route: '/pages/workbench/paperSetting/list'
						}
						// {
						// 	icon: '/static/images/staging/paperSetting.png',
						// 	title: '点餐助手',
						// 	route: '/pages/workbench/orderingAssistant/list'
						// }
					]
				},
				{
					title: '会员管理',
					list: [
						{
							icon: '/static/images/staging/hyzl.png',
							title: '会员资料',
							route: '/pages/workbench/memberInfo/list'
						},
						{
							icon: '/static/images/staging/hyfl.png',
							title: '会员分类',
							route: '/pages/workbench/memberCategory/list'
						},
						{
							icon: '/static/images/staging/hydj.png',
							title: '会员等级',
							route: '/pages/workbench/memberLevel/list'
						},
						{
							icon: '/static/images/staging/czgz.png',
							title: '充值规则',
							route: '/pages/workbench/rechargeRules/list'
						}
						// {
						// 	icon: '/static/images/staging/jfgz.png',
						// 	title: '积分规则',
						// 	route: '/pages/workbench/integralRules/list'
						// }
					]
				},
				{
					title: '店务管理',
					list: [
						{
							icon: '/static/images/staging/bmgl.png',
							title: '部门管理',
							route: '/pages/workbench/departManager/list'
						},
						{
							icon: '/static/images/staging/yggl.png',
							title: '员工管理',
							route: '/pages/workbench/staffManager/list'
						},
						{
							icon: '/static/images/staging/zzjg.png',
							title: '组织机构',
							route: '/pages/workbench/institution/list'
						},
						{
							icon: '/static/images/staging/mdgl.png',
							title: '门店管理',
							route: '/pages/workbench/store/list'
						},
						{
							icon: '/static/images/staging/shgl.png',
							title: '商户管理',
							route: '/pages/workbench/merchant/list'
						},
						{
							icon: '/static/images/staging/fwsgl.png',
							title: '服务商管理',
							route: '/pages/workbench/service/list'
						}
					]
				},
				{
					title: '营销管理',
					list: [
						{
							icon: '/static/images/staging/yhq.png',
							title: '优惠券',
							route: '/pages/workbench/coupon/list'
						},
						{
							icon: '/static/images/staging/lqff.png',
							title: '礼券发放',
							route: '/pages/workbench/couponGrant/list'
						},
						{
							icon: '/static/images/staging/tjzkgl.png',
							title: '特价折扣商品',
							route: '/pages/workbench/discountGoods/list'
						}
						// {
						// 	icon: '/static/images/staging/hdgl.png',
						// 	title: '活动管理',
						// 	route: '/pages/workbench/couponScan/list'
						// }
					]
				},
				{
					title: '系统管理',
					list: [
						{
							icon: '/static/images/staging/yhgl.png',
							title: '用户管理',
							route: '/pages/workbench/user/list'
						},
						{
							icon: '/static/images/staging/jsgl.png',
							title: '角色管理',
							route: '/pages/workbench/role/list'
						},
						{
							icon: '/static/images/staging/ptuz.png',
							title: '平台设置',
							route: '/pages/workbench/setPlatform/list'
						}
					]
				}
				/* 				{
					title: '团购核销',
					list: [
						{
							icon: '/static/images/staging/dytg.png',
							title: '抖音',
							route: '/pages/workbench/GroupPurVerify/tiktok'
						},
						{
							icon: '/static/images/staging/eleme.png',
							title: '饿了么',
							route: '/pages/workbench/GroupPurVerify/eleme'
						},
						{
							icon: '/static/images/staging/ptuz.png',
							title: '绑定门店',
							route: '/pages/workbench/GroupPurVerify/list'
						}
					]
				} */
			]
		};
	},
	computed: {
		...mapState(['store'])
	},
	methods: {
		goto(url) {
			uNavigateTo(url);
		}
	}
};
</script>

<style lang="scss" scoped>
.stagin {
	padding: 0 20rpx;

	.grid {
		position: relative;
		margin-top: 20rpx;
		padding: 0 20rpx 20rpx;
		background-color: #fff;
		border-radius: 10rpx;

		.title {
			font-weight: 600;
			font-size: 30rpx;
			height: 80rpx;
			line-height: 80rpx;
		}
		.hr {
			width: 100%;
			height: 2rpx;
			background-color: #dddcdc;
		}

		.menu {
			display: flex;
			flex-wrap: wrap;

			.item {
				margin-top: 20rpx;
				width: 25%;
				font-size: 14px;
				padding: 10rpx;
				display: flex;
				flex-direction: column;
				align-items: center;

				.icon {
					display: block;
					width: 30px;
					height: 30px;
					margin-bottom: 14rpx;
				}
			}
		}
	}
}
</style>